load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

cc_library(
    name = "fasttext",
    srcs = glob(
        ["src/**/*.cc"],
        exclude = ["src/main.cc"],
    ),
    hdrs = glob(
        ["src/**/*.h"],
        exclude = ["src/aligned.h"],
    ),
    copts = ["-std=c++17"],
    features = ["parse_headers"],
    include_prefix = "fasttext",
    includes = ["src"],
    strip_include_prefix = "src",
    textual_hdrs = ["src/aligned.h"],
    visibility = ["//visibility:public"],
)

cc_binary(
    name = "fasttext_cli",
    srcs = ["src/main.cc"],
    copts = ["-std=c++17"],
    visibility = ["//visibility:public"],
    deps = [":fasttext"],
)
